package workspace;


import java.util.Scanner;
//有字符串yujwedjhccdskdsewirewrwsadm,fnsdklwweqpq取出所有两个w之间的字符串并用归并排序进行排序 （字符串处理）
public class test142 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String input = scanner.next();
        String[] str = input.split("w");

        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < str.length; i++) {
            if(i!=0&&i!= str.length-1&&str[i].length()!=0){
                sb.append(str[i]);
            }
        }
        //提取出w之间的字母
        char[] ch = new char[sb.length()];
        for (int i = 0; i < sb.length(); i++) {
            ch[i] = sb.charAt(i);
        }

        char[] temp = new char[sb.length()];
        sort(ch,0,sb.length()-1,temp);

        for (int i = 0; i < ch.length; i++) {
            System.out.print(ch[i]);
        }
    }
    public static void sort(char[] str,int left,int right,char[] temp){
        if(left<right){
            int mid = (left+right)/2;
            sort(str,left,mid,temp);
            sort(str,mid+1,right,temp);
            merge(str,left,mid,right,temp);
        }
    }


    public static void merge(char[] str,int left,int mid,int right,char[] temp){

        int i = left;
        int j = mid +1;
        int t = 0;

        while(i<=mid&&j<=right){
            if(str[i]<=str[j]){
                temp[t++] = str[i++];
            }else{
                temp[t++] = str[j++];
            }
        }
        while(i<=mid){
            temp[t++] = str[i++];
        }
        while(j<=right){
            temp[t++] = str[j++];
        }
        t=0;
        while(left<=right){
            str[left++]=temp[t++];
        }
    }

}
